import request from '@/utils/request'

// 查询实有房屋列表
export function listEstate(query) {
  return request({
    url: '/community/estate/list',
    method: 'get',
    params: query
  })
}

// 添加楼栋
export function addBathEstate(data) {
  return request({
    url: '/community/estate/bathInsert',
    method: 'post',
    data: data
  })
}

// 查询实有房屋列表
export function estateList(id) {
  return request({
    url: '/community/estate/estateList',
    method: 'get',
    params: {id}
  })
}

// 查询实有房屋详细
export function getEstate(id) {
  return request({
    url: '/community/estate/' + id,
    method: 'get'
  })
}

// 新增实有房屋
export function addEstate(data) {
  return request({
    url: '/community/estate',
    method: 'post',
    data: data
  })
}

// 修改实有房屋
export function updateEstate(data) {
  return request({
    url: '/community/estate',
    method: 'put',
    data: data
  })
}

// 删除实有房屋
export function delEstate(id) {
  return request({
    url: '/community/estate/' + id,
    method: 'delete'
  })
}
